<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>英雄详情</title>
</head>
<body>
<script type="text/html" id="form">
    <div class="mainBox">
        <div class="main-container">
            <div class="main-container">
                <blockquote class="layui-elem-quote">基础信息</blockquote>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            英雄名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.name}}" autocomplete="off"
                                    class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            关联ID</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.relation_id}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            英雄昵称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.nickname}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            英雄类型</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.type}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            英雄位置</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.position}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>

                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">
                        英雄小图</label>
                    <div class="layui-input-block>">
                        <a href="{{d.icon}}" target="_blank"><img src="{{d.icon}}" width="50px"/></a>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">
                        英雄大图</label>
                    <div class="layui-input-block">
                        <a href="{{d.url}}" target="_blank"> <img src="{{d.url}}" width="300px"/></a>
                    </div>
                </div>
                <blockquote class="layui-elem-quote">基础属性</blockquote>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            最大生命</label>
                        <div class="layui-input-inline">
                            <input type="text" readonly  value="{{d.max_hp}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            最大法力</label>
                        <div class="layui-input-inline">
                            <input type="text"  readonly  value="{{d.max_mp}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            法术攻击</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.spe_atk}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            物理攻击</label>
                        <div class="layui-input-inline">
                            <input type="text" readonly  value="{{d.phy_atk}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            物理防御</label>
                        <div class="layui-input-inline">
                            <input type="text"  readonly  value="{{d.phy_def}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            法术防御</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.spe_def}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <blockquote class="layui-elem-quote">攻击属性</blockquote>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            移速</label>
                        <div class="layui-input-inline">
                            <input type="text" readonly  value="{{d.movement}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            攻速加成</label>
                        <div class="layui-input-inline">
                            <input type="text"  readonly  value="{{d.atk_speed}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            暴击几率</label>
                        <div class="layui-input-inline">
                            <input type="text" name="name" readonly  value="{{d.crit_rat}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            暴击效果</label>
                        <div class="layui-input-inline">
                            <input type="text" readonly  value="{{d.crit_eff}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            攻击范围</label>
                        <div class="layui-input-inline">
                            <input type="text"  readonly  value="{{d.atk_range}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <blockquote class="layui-elem-quote">防御属性</blockquote>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            每五秒回血</label>
                        <div class="layui-input-inline">
                            <input type="text" readonly  value="{{d.hp_rec}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">
                            每五秒回蓝</label>
                        <div class="layui-input-inline">
                            <input type="text"  readonly  value="{{d.mp_rec}}" autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                </div>
                <blockquote class="layui-elem-quote">英雄技能</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col>
                            <col>
                            <col style="width: 5%;">
                            <col style="width: 5%;">
                            <col style="width: 8%;">
                            <col style="width: 5%;">
                            <col>
                            <col style="width: 30%;">
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">名称</th>
                            <th style="text-align: center">图标</th>
                            <th style="text-align: center">类型</th>
                            <th style="text-align: center">形态</th>
                            <th style="text-align: center">冷却时间</th>
                            <th style="text-align: center">消耗</th>
                            <th style="text-align: center">标签</th>
                            <th style="text-align: center">描述</th>
                            <th style="text-align: center">提升</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.skill){ }}
                        <tr>
                            <td style="text-align: center">  {{d.skill[k].skill_name}}</td>
                            <td style="text-align: center">  <img width="50px" height="50px" src="{{d.skill[k].icon}}"></td>
                            <td style="text-align: center">  {{# if(d.skill[k].skill_type == 1){ }}主动 {{# } }}{{# if(d.skill[k].skill_type == 2){ }}被动{{# } }}</td>
                            <td style="text-align: center">  {{d.skill[k].skill_form}}</td>
                            <td style="text-align: center">  {{d.skill[k].cooling_time}}</td>
                            <td style="text-align: center">  {{d.skill[k].consume}}</td>
                            <td style="text-align: center">  {{d.skill[k].skills}}</td>
                            <td style="text-align: center;height:auto;overflow:visible;text-overflow:inherit;">  {{d.skill[k].skill_description}}</td>
                            <td style="text-align: center">  {{d.skill[k].level}} </td>
                        </tr>
                        {{# } }}
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">推荐装备</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col style="text-align: center">
                            <col style="text-align: center">
                            <col style="text-align: center">
                            <col style="text-align: center">
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">名称</th>
                            <th style="text-align: center">图片</th>
                            <th style="text-align: center">登场率</th>
                            <th style="text-align: center">胜率</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.equipment){ }}
                            <tr>
                                <td style="text-align: center">  {{d.equipment[k].equipment.name}}</td>
                                <td style="text-align: center">  <img width="50px" height="50px" src="{{d.equipment[k].equipment.icon}}"></td>
                                <td style="text-align: center">  {{d.equipment[k].show_rate}}</td>
                                <td style="text-align: center">  {{d.equipment[k].win_rate}}</td>
                            </tr>
                        {{# } }}
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">推荐铭文</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col style="width: 40%;">
                            <col  style="width: 30%;">
                            <col  style="width: 30%;">
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">铭文方案</th>
                            <th style="text-align: center">登场率</th>
                            <th style="text-align: center">胜率</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.rune){ }}
                        <tr>
                            <td style="text-align: center">  {{d.rune[k].showLabel}}</td>
                            <td style="text-align: center">  {{d.rune[k].show_rate}}</td>
                            <td style="text-align: center">  {{d.rune[k].win_rate}}</td>
                        </tr>
                        {{# } }}
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">克制</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col style="width: 40%;">
                            <col  style="width: 30%;">
                            <col  style="width: 30%;">
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">英雄名称</th>
                            <th style="text-align: center">英雄图片</th>
                            <th style="text-align: center">克制指数</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.relation){ }}
                            {{# if (d.relation[k].type == 1 && d.relation[k].hero) { }}
                                <tr>
                                    <td style="text-align: center">  {{d.relation[k].hero.name}}</td>
                                    <td style="text-align: center">   <img width="50px" height="50px" src="{{d.relation[k].hero.icon}}"></td>
                                    <td style="text-align: center">  {{d.relation[k].param_data}}</td>
                                </tr>
                            {{# } }}
                        {{# } }}
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">被克制</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col style="width: 40%;">
                            <col  style="width: 30%;">
                            <col  style="width: 30%;">
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">英雄名称</th>
                            <th style="text-align: center">英雄图片</th>
                            <th style="text-align: center">克制指数</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.relation){ }}
                        {{# if (d.relation[k].type == 2  && d.relation[k].hero) { }}
                        <tr>
                            <td style="text-align: center">  {{d.relation[k].hero.name}}</td>
                            <td style="text-align: center">   <img width="50px" height="50px" src="{{d.relation[k].hero.icon}}"></td>
                            <td style="text-align: center">  {{d.relation[k].param_data}}</td>
                        </tr>
                        {{# } }}
                        {{# } }}
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">双排</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col>
                            <col>
                            <col>
                            <col>
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">英雄名称</th>
                            <th style="text-align: center">英雄图片</th>
                            <th style="text-align: center">出场率增益</th>
                            <th style="text-align: center">胜率增益</th>
                            <th style="text-align: center">搭配指数</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.team){ }}
                        {{# if (d.team[k].type == 1 && d.team[k].hero) { }}
                        <tr>
                            <td style="text-align: center">  {{d.team[k].hero.name}}</td>
                            <td style="text-align: center">   <img width="50px" height="50px" src="{{d.team[k].hero.icon}}"></td>
                            <td style="text-align: center">  {{d.team[k].show_rate}}</td>
                            <td style="text-align: center">  {{d.team[k].win_rate}}</td>
                            <td style="text-align: center">  {{d.team[k].param_data}}</td>
                        </tr>
                        {{# } }}
                        {{# } }}
                        </tbody>
                    </table>
                </div>
                <blockquote class="layui-elem-quote">三排</blockquote>
                <div class="layui-form-item">
                    <table class="layui-table">
                        <colgroup>
                            <col>
                            <col>
                            <col>
                            <col>
                            <col>
                        </colgroup>
                        <thead>
                        <tr>
                            <th style="text-align: center">英雄1名称</th>
                            <th style="text-align: center">英雄1图片</th>
                            <th style="text-align: center">英雄2名称</th>
                            <th style="text-align: center">英雄2图片</th>
                            <th style="text-align: center">搭配指数</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{# for (let k in d.team){ }}
                        {{# if (d.team[k].type == 2 && d.team[k].hero && d.team[k].heroTwo) { }}
                        <tr>
                            <td style="text-align: center">  {{d.team[k].hero.name}}</td>
                            <td style="text-align: center">   <img width="50px" height="50px" src="{{d.team[k].hero.icon}}"></td>
                            <td style="text-align: center">  {{d.team[k].heroTwo.name}}</td>
                            <td style="text-align: center">   <img width="50px" height="50px" src="{{d.team[k].heroTwo.icon}}"></td>
                            <td style="text-align: center">  {{d.team[k].param_data}}</td>
                        </tr>
                        {{# } }}
                        {{# } }}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</script>
<form class="layui-form" lay-filter="layui-form"></form>
<script>
    if (localStorage.getItem("staticDomain")) {
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
    } else {
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v=" + localStorage.getItem("version") + "'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v=" + localStorage.getItem("version") + "'><\/script>");
    }
</script>
<script>
    layui.use(['laytp'], function () {
        let form = layui.form;
        let $ = layui.jquery;
        //获取参数ID
        var id = facade.getUrlParam('id');
        if (!id) {
            facade.error('参数ID不能为空');
            return false;
        }

        //获取数据，渲染到对应的节点上
        facade.ajax({
            route: "/admin.wzg.hero/info",
            data: {id: id},
            successAlert: false,
            showLoading: true
        }).done(function (res) {
            if (res.code === 0) {
                layui.laytpl($("#form").html()).render(res.data, function (string) {
                    $("form").html(string);
                    layui.laytpForm.render();
                    form.render();
                });
            }
        });
    })
</script>
</body>
</html>